/*
 * PayResultKeyValueHolder.java
 * business
 *
 * Created by ChenTao on 2017/6/28.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.viewholder;

import android.view.View;
import android.widget.TextView;

import com.yidiandao.business.R;
import com.yidiandao.business.data.response.QueryOrderResultResponse;
import com.yidiandao.business.ui.widget.listview.ViewHolder;

/**
 * 支付结果-Key-Value
 * <p>
 * Created by ChenTao(chentao7v@gmail.com) on 2017-06-28 11:49
 */
public class PayResultKeyValueHolder extends ViewHolder {

    private TextView tvKey;

    private TextView tvValue;

    @Override
    protected void initView(View rootView) {
        tvKey = (TextView) rootView.findViewById(R.id.tv_key);
        tvValue = (TextView) rootView.findViewById(R.id.tv_value);
    }

    @Override
    protected int getItemLayoutId() {
        return R.layout.item_pay_result_key_value;
    }

    public void refreshUI(QueryOrderResultResponse.Data.PayDesc data) {
        tvKey.setText(data.getName()+"：");
        tvValue.setText(data.getDesc());
    }
}
